<?php

namespace app\websocket\listener;

use Swoole\Server;

class SwooleWorkerStart
{
    public function handle(Server $server, int $workerId)
    {
        // Worker进程启动时的初始化逻辑
        if ($server->taskworker) {
            echo "TaskWorker#{$workerId} started\n";
        } else {
            echo "Worker#{$workerId} started\n";
        }
    }
}
